<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

</head>
<body>
	<table width="700" border="1">
		<tr>
			<th>商品Id</th>
			<th>商品名</th>
			<th>商品厂商</th>
			<th>商品类型</th>
			<th>商品价格</th>
			<th>商品库存</th>
			<th>操作</th>
		</tr>
		<c:forEach items="${page.data }" var="goods">
			<tr>
				<td>${goods.goodsId}</td>
				<td>${goods.goodsName}</td>
				<td>${goods.goodsFactory}</td>
				<td>${goods.goodsType}</td>
				<td>${goods.goodsPrice}</td>
				<td>${goods.goodsNum}</td>
				<td>
					<a herf = "deleteGoods.do?goodsId=${goods.goodsId }" class="as">删除</a>
				</td>
			</tr>
		</c:forEach>
	</table>
	<!-- 分页查询 -->
	<div id = "pageBar">
		<c:if test="${page.hasPrev }">
			<a href = "getGoods.do?pageNum=${page.pageNum-1 }">上一页</a>
		</c:if>
		
		<c:forEach begin="1" end="${page.totalPages}" var="n">
			<a hreh="getGoods.do?pageNum=${n}">${n}</a>
		</c:forEach>
		
		<c:if test="${page.hasNext}">
			<a href = "getGoods.do?pageNum=${page.pageNum+1 }">下一页</a>
		</c:if>
	</div>
	
</body>
</html>